Skip to content

fix(datashare python): pydantic deserialization#56

Merged
ClemDoum merged 3 commits into
mainfrom
fix(datashare-python)/pydantic-deserialization
Jun 22, 2026
Merged

fix(datashare python): pydantic deserialization#56
ClemDoum merged 3 commits into
mainfrom
fix(datashare-python)/pydantic-deserialization

Conversation

@ClemDoum

Copy link
Copy Markdown
Contributor

⚠️ breaks datashare-python's API: activity_defn

Descriptions

Addresses #47 and refactor activity definition using temporal's interceptor builtin mechanism rather than chaining decorators.

By default temporal bypasses deserialization using the data converter when task argument length differ from activity function arg length.
This is typically the case when we introduce def my_activity_fn(arg_1: PydanticBaseModel, *, progress: ProgressRateHandler | None = None) since the progress is injected and not passed as activity argument by the user.

This was the source of many failure to deserialize pydantic objects as BaseModel but as dict instead

Changes

datashare-python

Fixed

  • Pydantic argument deserialization due support of positional only args in temporal

Changed

  • remove decorator chaining inside activity_defn in favor of temporal interceptor mechanism

@ClemDoum ClemDoum requested a review from winsomeglint June 22, 2026 10:30
@ClemDoum ClemDoum self-assigned this Jun 22, 2026
@ClemDoum ClemDoum marked this pull request as ready for review June 22, 2026 10:30
@ClemDoum ClemDoum merged commit 869127b into main Jun 22, 2026
12 of 14 checks passed
@ClemDoum ClemDoum deleted the fix(datashare-python)/pydantic-deserialization branch June 22, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant